﻿using Microsoft.Practices.Unity;

namespace UnityProvider
{
    public static class UnityInstanceProvider
    {
        private static IUnityContainer _unityContainer;

        public static IUnityContainer ApplicationWideUnityInstance
        {
            get { return _unityContainer ?? (_unityContainer = new UnityContainer()); }
            set { _unityContainer = value; }
        }

        public static IUnityContainer NewUnityInstance
        {
            get { return new UnityContainer(); }
        }
    }
}